package com.hlz.flink.wc;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @author Hongliang Zhu
 * @create 2022-11-27 11:41
 */
public class TestMap {

    public static void main(String[] args) {
        String[] words = {"Hello", "World"};

        List<Object> collect = Arrays.stream(words).map(word -> word.split("")).flatMap(Arrays::stream).distinct().collect(Collectors.toList());
        System.out.println(collect);
    }
}
